package com.sanjiahantang.youjiaclient.module.me.address.beans;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sanjiahantang.youjiaclient.base.BaseBean;

import java.io.Serializable;
import java.util.List;

/**
 * Created by sks on 2015/9/24.
 */
public class AddressBean extends BaseBean {
    private String data;

    public List<Data> getData() {
        return new Gson().fromJson(data, new TypeToken<List<Data>>() {}.getType());
    }

    public void setData(String data) {
        this.data = data;
    }

    /**
     * Created by sks on 2015/9/24.
     *
     * 0 = {StringMap$LinkedEntry@6170} "fullAddress" -> "11"
     1 = {StringMap$LinkedEntry@6171} "cellPhone" -> "18822185396"
     2 = {StringMap$LinkedEntry@6172} "customerName" -> "11"
     3 = {StringMap$LinkedEntry@6173} "fullAddress" -> "11"
     4 = {StringMap$LinkedEntry@6174} "isDefault" -> "1"
     5 = {StringMap$LinkedEntry@6175} "phone" -> "18822185396"
     6 = {StringMap$LinkedEntry@6176} "ucaId" -> "-1.0"
     */
    public static class Data implements Serializable {
        private int ucaId;//收货地址id
        private String address;
        private String fullAddress;//详细的收货地址
        private String phone;//电话
        private String customerName;//收货人姓名
        private int isDefault;//是否默认收货地址0不是默认1是默认
        private String cellPhone;

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public int getUcaId() {
            return ucaId;
        }

        public void setUcaId(int ucaId) {
            this.ucaId = ucaId;
        }

        public String getFullAddress() {
            return fullAddress;
        }

        public void setFullAddress(String fullAddress) {
            this.fullAddress = fullAddress;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getCustomerName() {
            return customerName;
        }

        public void setCustomerName(String customerName) {
            this.customerName = customerName;
        }

        public int getIsDefault() {
            return isDefault;
        }

        public void setIsDefault(int isDefault) {
            this.isDefault = isDefault;
        }

        public String getCellPhone() {
            return cellPhone;
        }

        public void setCellPhone(String cellPhone) {
            this.cellPhone = cellPhone;
        }
    }
}
